h1{font-style: italic}
body{background-color:#FFFFCC; padding:10px}
p{padding:10px}
This meme is my real feeling of learning data science. The cat represents me, and the vegetable represents my “data science.”
library(magick)
# creat a vector for text
meme_text = c('ACTUALLY', 'FIRST CLASS', 'AFTER ONE SEMESTER', 'Data and me in fantasy')
#creat evry single part image
image0 <- image_blank(color = "black", width = 400, height = 100) %>%
image_annotate(text = meme_text[1], color = '#FFFFFF', size = 40, font = "Impact", gravity = "center")
image1 <- image_read(path='1.jpg')%>%
image_scale(400)
image2 <- image_blank(color = "black", width = 400, height = 100) %>%
image_annotate(text = meme_text[2], color = '#FFFFFF', size = 40, font = "Impact", gravity = "center")
image3 <- image_read(path='2.jpg')%>%
image_scale(400)
image4 <- image_blank(color = "black", width = 400, height = 100) %>%
image_annotate(text = meme_text[4], color = '#FFFFFF', size = 40, font = "Impact", gravity = "center")
image5 <- image_read(path='4.jpg')%>%
image_scale(400)
image6 <- image_blank(color = "black", width = 400, height = 100) %>%
image_annotate(text = meme_text[3], color = '#FFFFFF', size = 40, font = "Impact", gravity = "center")
image7 <- image_read(path='5.jpg')%>%
image_scale(400)
#combine image to fram
frame2 <- c(image0,image1)%>%
image_append(stack = TRUE)
frame3 <- c(image2,image3)%>%
image_append(stack = TRUE)
frame1 <- c(image4, image5)%>%
image_append(stack = TRUE)
frame4 <- c(image6, image7)%>%
image_append(stack = TRUE)
#save
image_extent(frame1,500)%>%
image_write("frame1.png")
image_extent(frame2,500)%>%
image_write("frame2.png")
image_extent(frame3,500)%>%
image_write("frame3.png")
image_extent(frame4,500)%>%
image_write("frame4.png")
At first, I thought it was easy to analyze data, but actually for the first time, I felt completely overwhelmed by data. But with the study, I think I have the ability to deal with these data
meme
library(magick)
frame1 <- image_read("frame1.png")
frame2 <- image_read("frame2.png")
frame3 <- image_read("frame3.png")
frame4 <- image_read("frame4.png")
#combine and save
frames <- c(frame1, frame2, frame3, frame4)
image_animate(frames, fps = 1)%>%
image_write("my_meme.gif")